import 'package:flutter/material.dart';

class Custom extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('自定义组件'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            RaisedButton(
              child: Text("组合实例"),
              onPressed: (){
                Navigator.of(context).pushNamed('/custom/turn_box');
              },
            ),
            RaisedButton(
              child: Text("自绘棋盘"),
              onPressed: (){
                Navigator.of(context).pushNamed('/custom/paint');
              },
            ),
          ].map((e) {
            return Padding(
              padding: EdgeInsets.all(16),
              child: e,
            );
          }).toList(),
        ),
      ),
    );
  }
}